package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OCatalogMenuMapper;
import com.education.online.pojo.OCatalogMenu;
import com.education.online.service.OCatalogMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 目录体系表 服务层实现
 *
 * @author d
 * @date 2020-06-04 15:17:55
 */
@Service
public class OCatalogMenuServiceImpl implements OCatalogMenuService {

    @Autowired
    private OCatalogMenuMapper oCatalogMenuMapper;

    @Override
    public List<OCatalogMenu> selectOCatalogMenuByParentId(Integer parentId) {
        return oCatalogMenuMapper.selectOCatalogMenuByParentId(parentId);
    }

    //查询目录体系表信息
    @Override
    public OCatalogMenu selectOCatalogMenuById(Integer id) {
        return oCatalogMenuMapper.selectOCatalogMenuById(id);
    }

    // 查询目录体系表列表
    @Override
    public List<OCatalogMenu> selectOCatalogMenuList(OCatalogMenu oCatalogMenu) {
        return oCatalogMenuMapper.selectOCatalogMenuList(oCatalogMenu);
    }

    // 新增目录体系表
    @Override
    public int insertOCatalogMenu(OCatalogMenu oCatalogMenu) {
        return oCatalogMenuMapper.insertOCatalogMenu(oCatalogMenu);
    }

    //修改目录体系表
    @Override
    public int updateOCatalogMenu(OCatalogMenu oCatalogMenu) {
        return oCatalogMenuMapper.updateOCatalogMenu(oCatalogMenu);
    }

    //删除目录体系表对象
    @Override
    public int deleteOCatalogMenuByIds(String ids) {
        return oCatalogMenuMapper.deleteOCatalogMenuByIds(Convert.toStrArray(ids));
    }
}